home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 5 / Eagles_Nest_Mac_Collection_Disc_5.TOAST / 7th-College / LearnSpan#2 / English_Spanish II 1.05 / background_2699.txt < prev    next >
Text File  |  1990-03-27  |  11KB  |  485 lines

  1. -- background: 2699 from stack: in.05
  2. -- bmap block id: 3167
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on mouseDown
  8.   global showAnswers,reverse
  9.  
  10.   if not showAnswers then
  11.     if reverse then
  12.       set visible of bkgnd field "Source" to false
  13.       set visible of bkgnd field "Translation" to true
  14.     else
  15.       set visible of bkgnd field "Source" to true
  16.       set visible of bkgnd field "Translation" to false
  17.     end if
  18.   end if
  19. end mouseDown
  20.  
  21. function jumpWithinLimits loBottom,hiBottom,loTop,hiTop,skip
  22. global offset
  23. if not skip then
  24.   put (the random of (hiTop - loBottom + 1) + offset + loBottom - 1) into landingCard
  25. else
  26.   put the random of 2 into switch
  27.   put (the random of (hiBottom - loBottom + 1) + offSet + loBottom - 1) into temp
  28.   put (the random of (hiTop - loTop + 1) + offSet + loTop -1) into temp2
  29.   if switch is 1 then put temp into landingCard
  30.   else put temp2 into landingCard
  31. end if
  32. return landingCard
  33. end jumpWithinLimits
  34.  
  35. function groupBounds
  36. global A,B,C,D,minA,maxA,minB,maxB,minC,maxC,minD,maxD
  37. put false into skip
  38. if A then
  39.   put minA into loBottom
  40.   if B then
  41.     if C then
  42.       if D then put maxD into hiTop       --ABCD
  43.       else put maxC into hiTop            --ABCD'
  44.     else
  45.       if D then
  46.         put true into skip
  47.         put maxB into hiBottom
  48.         put minD into loTop
  49.         put maxD into hiTop              --ABC'D
  50.       else put maxB into hiTop           --ABC'D'
  51.     end if
  52.   else
  53.     if C then
  54.       if D then
  55.         put true into skip               --AB'CD
  56.         put maxA into hiBottom
  57.         put minC into loTop
  58.         put maxD into hiTop
  59.       else
  60.         put true into skip               --AB'CD'
  61.         put maxA into hiBottom
  62.         put minC into loTop
  63.         put maxC into hiTop
  64.       end if
  65.     else
  66.       if D then
  67.         put true into skip
  68.         put maxA into hiBottom
  69.         put minD into loTop
  70.         put maxD into hiTop             --AB'C'D
  71.       else put maxA into hiTop          --AB'C'D'
  72.     end if
  73.   end if
  74. else
  75.   put minB into loBottom
  76.   if B then
  77.     if C then
  78.       if D then put maxD into hiTop     --A'BCD
  79.       else put maxC into hiTop          --A'BCD'
  80.     else
  81.       if D then
  82.         put true into skip              --A'BC'D
  83.         put maxB into hiBottom
  84.         put minD into loTop
  85.         put maxD into hiTop
  86.       else put maxB into hiTop          --A'BC'D'
  87.     end if
  88.   else
  89.     put minC into loBottom
  90.     if C then
  91.       if D then put maxD into hiTop     --A'B'CD
  92.       else put maxC into hiTop          --A'B'CD'
  93.     else
  94.       put minD into loBottom
  95.       if D then put maxD into hiTop     --A'B'C'D
  96.     end if
  97.   end if
  98. end if
  99. put loBottom into item 1 of bounds
  100. put hiBottom into item 2 of bounds
  101. put loTop into item 3 of bounds
  102. put hiTop into item 4 of bounds
  103. put skip into item 5 of bounds
  104. return bounds
  105. end groupBounds
  106.  
  107. on arrowKey direction
  108.   if direction is "right" then
  109.     click at loc of bkgnd button "Next"
  110.   else
  111.     click at loc of bkgnd button "Prev"
  112.   end if
  113. end arrowKey
  114.  
  115.  
  116.  
  117.  
  118. -- part 27 (button)
  119. -- low flags: 00
  120. -- high flags: 0000
  121. -- rect: left=1 top=0 right=341 bottom=512
  122. -- title width / last selected line: 0
  123. -- icon id / first selected line: 0 / 0
  124. -- text alignment: 1
  125. -- font id: 0
  126. -- text size: 12
  127. -- style flags: 0
  128. -- line height: 16
  129. -- part name: Answer Button
  130. ----- HyperTalk script -----
  131. on mouseDown
  132.   global reverse,lastClick
  133.   if the seconds - lastClick < 2 then exit mouseDown
  134.   if not reverse then
  135.     show field "Translation"
  136.   else
  137.     show field "Source"
  138.   end if
  139. end MouseDown
  140.  
  141. on mouseUp
  142.   global scanRate,A,B,C,D,showAnswers,reverse,lastClick
  143.   if the seconds - lastClick < 2 then
  144.     exit mouseUp
  145.   else
  146.     put the seconds into lastClick
  147.     wait scanRate div 2 seconds
  148.     if not showAnswers then
  149.       if not reverse then
  150.         hide field "Translation"
  151.       else
  152.         hide field "Source"
  153.       end if
  154.     end if
  155.     set lockScreen to true
  156.     click at 282,296
  157.     set lockScreen to false
  158.   end if
  159. end mouseUp
  160.  
  161.  
  162.  
  163. -- part 6 (field)
  164. -- low flags: 01
  165. -- high flags: 0000
  166. -- rect: left=414 top=99 right=119 bottom=492
  167. -- title width / last selected line: 0
  168. -- icon id / first selected line: 0 / 0
  169. -- text alignment: 1
  170. -- font id: 21
  171. -- text size: 12
  172. -- style flags: 256
  173. -- line height: 16
  174. -- part name: Index Number
  175.  
  176.  
  177. -- part 8 (button)
  178. -- low flags: 00
  179. -- high flags: 0000
  180. -- rect: left=261 top=276 right=317 bottom=302
  181. -- title width / last selected line: 0
  182. -- icon id / first selected line: 1013 / 1013
  183. -- text alignment: 1
  184. -- font id: 0
  185. -- text size: 12
  186. -- style flags: 0
  187. -- line height: 16
  188. -- part name: Next
  189. ----- HyperTalk script -----
  190. on mouseUp
  191.   global A,B,C,D,minA,maxA,minB,maxB,minC,maxC,minD,maxD,offset,inOrder
  192.  
  193.   get groupBounds()
  194.   put item 1 of it into loBottom
  195.   put item 2 of it into hiBottom
  196.   put item 3 of it into loTop
  197.   put item 4 of it into hiTop
  198.   put item 5 of it into skip
  199.  
  200.   if inOrder then
  201.     if bkgnd field "Index Number" is hiTop then
  202.       go card (loBottom + offset)
  203.     else
  204.       if not skip then
  205.         go next card of this background
  206.       else
  207.         if bkgnd field "Index Number" is hiBottom then
  208.           go card (loTop + offset)
  209.         else go next card of this background
  210.       end if
  211.     end if
  212.   else go card jumpWithinLimits(loBottom,hiBottom,loTop,hiTop,skip)
  213. end mouseUp
  214.  
  215.  
  216.  
  217.  
  218.  
  219. -- part 9 (button)
  220. -- low flags: 00
  221. -- high flags: 0000
  222. -- rect: left=195 top=276 right=317 bottom=239
  223. -- title width / last selected line: 0
  224. -- icon id / first selected line: 1014 / 1014
  225. -- text alignment: 1
  226. -- font id: 0
  227. -- text size: 12
  228. -- style flags: 0
  229. -- line height: 16
  230. -- part name: Prev
  231. ----- HyperTalk script -----
  232. on mouseUp
  233.   global A,B,C,D,minA,maxA,minB,maxB,minC,maxC,minD,maxD,offset,inOrder
  234.  
  235.   get groupBounds()
  236.   put item 1 of it into loBottom
  237.   put item 2 of it into hiBottom
  238.   put item 3 of it into loTop
  239.   put item 4 of it into hiTop
  240.   put item 5 of it into skip
  241.  
  242.   if inOrder then
  243.     if bkgnd field "Index Number" is loBottom then
  244.       go card (hiTop + offset)
  245.     else
  246.       if not skip then
  247.         go previous card of this background
  248.       else
  249.         if bkgnd field "Index Number" is loTop then
  250.           go card (hiBottom + offset)
  251.         else
  252.           go previous card of this background
  253.         end if
  254.       end if
  255.     end if
  256.   else go card jumpWithinLimits(loBottom,hiBottom,loTop,hiTop,skip)
  257. end mouseUp
  258.  
  259.  
  260.  
  261. -- part 18 (field)
  262. -- low flags: 01
  263. -- high flags: 0000
  264. -- rect: left=18 top=197 right=230 bottom=247
  265. -- title width / last selected line: 0
  266. -- icon id / first selected line: 0 / 0
  267. -- text alignment: 1
  268. -- font id: 21
  269. -- text size: 12
  270. -- style flags: 256
  271. -- line height: 16
  272. -- part name: Source
  273.  
  274.  
  275. -- part 19 (field)
  276. -- low flags: 81
  277. -- high flags: 0000
  278. -- rect: left=255 top=197 right=230 bottom=483
  279. -- title width / last selected line: 0
  280. -- icon id / first selected line: 0 / 0
  281. -- text alignment: 1
  282. -- font id: 21
  283. -- text size: 12
  284. -- style flags: 256
  285. -- line height: 16
  286. -- part name: Translation
  287.  
  288.  
  289. -- part 23 (button)
  290. -- low flags: 00
  291. -- high flags: A004
  292. -- rect: left=418 top=44 right=75 bottom=497
  293. -- title width / last selected line: 0
  294. -- icon id / first selected line: 0 / 0
  295. -- text alignment: 1
  296. -- font id: 0
  297. -- text size: 12
  298. -- style flags: 0
  299. -- line height: 16
  300. -- part name: Scan Cards
  301. ----- HyperTalk script -----
  302. on mouseUp
  303.   global scanRate,delayTime,scanRate,scanReverse,reverse,showAnswers
  304.   repeat until the mouseClick
  305.     if delayTime and not showAnswers then
  306.       put scanRate div 2 into delay
  307.       put delay + 1 into delay
  308.       wait delay seconds
  309.       if not reverse then
  310.         show field "Translation"
  311.         wait scanRate seconds
  312.         hide field "Translation"
  313.       else
  314.         show field "Source"
  315.         wait scanRate seconds
  316.         hide field "Source"
  317.       end if
  318.       if not scanReverse then click at the loc of bkgnd button "Next"
  319.       else click at the loc of bkgnd button "Prev"
  320.     else
  321.       wait scanRate seconds
  322.       if not scanReverse then click at the loc of bkgnd button "Next"
  323.       else click at the loc of bkgnd button "Prev"
  324.     end if
  325.   end repeat
  326. end mouseUp
  327.  
  328.  
  329.  
  330. -- part 25 (button)
  331. -- low flags: 00
  332. -- high flags: A004
  333. -- rect: left=159 top=44 right=75 bottom=218
  334. -- title width / last selected line: 0
  335. -- icon id / first selected line: 0 / 0
  336. -- text alignment: 1
  337. -- font id: 0
  338. -- text size: 12
  339. -- style flags: 0
  340. -- line height: 16
  341. -- part name: Options
  342. ----- HyperTalk script -----
  343. on mouseUp
  344.   go card 2
  345. end mouseUp
  346.  
  347.  
  348.  
  349. -- part 29 (button)
  350. -- low flags: 00
  351. -- high flags: A004
  352. -- rect: left=117 top=44 right=75 bottom=157
  353. -- title width / last selected line: 0
  354. -- icon id / first selected line: 0 / 0
  355. -- text alignment: 1
  356. -- font id: 0
  357. -- text size: 12
  358. -- style flags: 0
  359. -- line height: 16
  360. -- part name: Intro
  361. ----- HyperTalk script -----
  362. on mouseUp
  363.   go card 1
  364. end mouseUp
  365.  
  366.  
  367.  
  368. -- part 31 (button)
  369. -- low flags: 00
  370. -- high flags: 2004
  371. -- rect: left=83 top=44 right=75 bottom=115
  372. -- title width / last selected line: 0
  373. -- icon id / first selected line: 25002 / 25002
  374. -- text alignment: 1
  375. -- font id: 0
  376. -- text size: 12
  377. -- style flags: 0
  378. -- line height: 16
  379. -- part name: Help
  380. ----- HyperTalk script -----
  381. on mouseUp
  382.   go card 3
  383. end mouseUp
  384.  
  385.  
  386.  
  387. -- part 32 (button)
  388. -- low flags: 00
  389. -- high flags: 2004
  390. -- rect: left=15 top=44 right=75 bottom=45
  391. -- title width / last selected line: 0
  392. -- icon id / first selected line: 20098 / 20098
  393. -- text alignment: 1
  394. -- font id: 0
  395. -- text size: 12
  396. -- style flags: 0
  397. -- line height: 16
  398. -- part name: 
  399. ----- HyperTalk script -----
  400. on mouseUp
  401.   go home
  402. end mouseUp
  403.  
  404.  
  405.  
  406. -- part 34 (button)
  407. -- low flags: 00
  408. -- high flags: A004
  409. -- rect: left=376 top=44 right=75 bottom=417
  410. -- title width / last selected line: 0
  411. -- icon id / first selected line: 0 / 0
  412. -- text alignment: 1
  413. -- font id: 0
  414. -- text size: 12
  415. -- style flags: 0
  416. -- line height: 16
  417. -- part name: Find
  418. ----- HyperTalk script -----
  419. on mouseUp
  420.   ask "Find: " with "Enter a word or phrase or card number"
  421.   set visible of bkgnd field "Source" to true
  422.   set visible of bkgnd field "Translation" to true
  423.   find whole it
  424. end mouseUp
  425.  
  426.  
  427.  
  428. -- part 35 (button)
  429. -- low flags: 00
  430. -- high flags: 0000
  431. -- rect: left=446 top=276 right=317 bottom=487
  432. -- title width / last selected line: 0
  433. -- icon id / first selected line: 1012 / 1012
  434. -- text alignment: 1
  435. -- font id: 0
  436. -- text size: 12
  437. -- style flags: 0
  438. -- line height: 16
  439. -- part name: Back
  440. ----- HyperTalk script -----
  441. on mouseUp
  442.   go back
  443. end mouseUp
  444.  
  445.  
  446.  
  447. -- part 39 (button)
  448. -- low flags: 00
  449. -- high flags: A004
  450. -- rect: left=47 top=44 right=75 bottom=81
  451. -- title width / last selected line: 0
  452. -- icon id / first selected line: 0 / 0
  453. -- text alignment: 1
  454. -- font id: 0
  455. -- text size: 12
  456. -- style flags: 0
  457. -- line height: 16
  458. -- part name: Quit
  459. ----- HyperTalk script -----
  460. on mouseUp
  461.   doMenu "quit hyperCard"
  462. end mouseUp
  463.  
  464.  
  465.  
  466. -- part 40 (button)
  467. -- low flags: 00
  468. -- high flags: 0000
  469. -- rect: left=18 top=277 right=315 bottom=59
  470. -- title width / last selected line: 0
  471. -- icon id / first selected line: 30557 / 30557
  472. -- text alignment: 1
  473. -- font id: 0
  474. -- text size: 12
  475. -- style flags: 0
  476. -- line height: 16
  477. -- part name: First
  478. ----- HyperTalk script -----
  479. on mouseUp
  480.   --FlashStack Version
  481.   global offset
  482.   go card firstGroup() + offset
  483. end mouseUp
  484.  
  485.